/*
 * Copyright (C), 2014-2016, org.esaydev
 * FileName: WechatConfig.java
 * Author:   jian
 * Date:     2016年3月14日 下午5:19:26
 */
package org.easydev.wechat.common.constants;

import org.apache.commons.lang3.StringUtils;
import org.easydev.wechat.servlet.AbsWechatService;

/**
 * <Description> 微信全局配置 <br>
 */
public class WechatConfig {

    /**
     * appId 由微信授予的appid,唯一非机密
     */
    private static String appId = StringUtils.EMPTY;

    /**
     * appSecret 微信授予的secret ，机密，不能暴露给用户
     */
    private static String appSecret = StringUtils.EMPTY;

    /**
     * token 令牌 应用自己定的，很重要，用于签名校验的，不用在url之间传递
     */
    private static String token = StringUtils.EMPTY;

    /**
     * wechatService
     */
    private static AbsWechatService wechatService;

    static {
        // TODO
        appId = "wxfb4b4c1778efe9c0";
        appSecret = "d30528312ffa09b0444d361953def09b";
    }

    /**
     * get appId
     * 
     * @return Returns the appId.<br>
     */
    public static String getAppId() {
        return appId;
    }

    /**
     * set appId
     * 
     * @param appId The appId to set. <br>
     */
    public static void setAppId(String appId) {
        WechatConfig.appId = appId;
    }

    /**
     * get appSecret
     * 
     * @return Returns the appSecret.<br>
     */
    public static String getAppSecret() {
        return appSecret;
    }

    /**
     * set appSecret
     * 
     * @param appSecret The appSecret to set. <br>
     */
    public static void setAppSecret(String appSecret) {
        WechatConfig.appSecret = appSecret;
    }

    /**
     * get token
     * 
     * @return Returns the token.<br>
     */
    public static String getToken() {
        return token;
    }

    /**
     * set token
     * 
     * @param token The token to set. <br>
     */
    public static void setToken(String token) {
        WechatConfig.token = token;
    }

    /**
     * get wechatService
     * 
     * @return Returns the wechatService.<br>
     */
    public static AbsWechatService getWechatService() {
        return wechatService;
    }

    /**
     * set wechatService
     * 
     * @param wechatService The wechatService to set. <br>
     */
    public static void setWechatService(AbsWechatService wechatService) {
        WechatConfig.wechatService = wechatService;
    }

}
